
export default class AndroidPlatform {

    public login(callback: (data:any) => void):void
    {
        window['wdNativeLoginResult'] = function(result){
            console.log("native ad result--------------------",result);
            callback(result);
        }
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "login", "(Ljava/lang/String;Ljava/lang/String;)V", "传参");
    }

    public watchAd(callback: (success:boolean) => void):void
    {
        window['wdNativeVideoResult'] = function(result){
            console.log("native ad result--------------------",result);
            callback(result);
        }
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "showAd", "()V");
    }

    public showBannerad()
    {
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "showBannerAd", "()V");
    }

    public hideBanner()
    {
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "hideBannerAd", "()V");
    }

    public event(id:number)
    {
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "customEvent", "(Ljava/lang/String;)V", id+"");
    }

    public showFullVideo()
    {
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "showFullVideo", "()V");
    }

    public showInformationAd(){
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "showFeedAd", "()V");
    }

    public hideInformationAd(){
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/WDNativePlatform", "hideFeedAd", "()V");
    }

}